package com.csun.cmny.provider.service;


import com.csun.cmny.provider.model.dto.OldManBirthdayDto;
import com.csun.cmny.provider.model.vo.OldmanRpcVo;
import com.csun.cmny.provider.pojo.*;
import com.csun.cmny.provider.vo.CheckinUserInfoVo;

import java.util.List;
import java.util.Map;

public interface OldmanCheckInService {
    /**
     * 添加老人入院
     * author:liqian
     * date:2018-11-06 14:12
     */
    int insert(OldmanCheckIn oldmanCheckIn);

    /**
     * 删除老人
     * author:liqian
     * date:2018-11-06 14:16
     */
    int deleteByOldId(Integer oldmanId);

    /**
     * 批量添加老人设备数据
     * author:liqian
     * date:2018-11-16 10:58
     */
    int insertOldDeviceBatch(List<OldmanDevice> oldmanDeviceList);

    /**
     * 批量添加老人私人定制项目数据
     * author:liqian
     * date:2018-11-16 14:05
     */
    int insertOldItemBatch(List<OldmanItem> oldmanItemList);

    OldmanCheckIn selectById(Integer oldmanId);

    /**
     * 删除老人设备数据
     * author:liqian
     * date:2018-11-16 14:19
     */
    int delOldDeviceByOid(Integer oldmanId);

    /**
     * 删除老人私人定制项目数据
     * author:liqian
     * date:2018-11-16 14:22
     */
    int delOldItemByOid(Integer oldmanId);

    /**
     * 查询老人基本信息及入院信息
     * author:liqian
     * date:2018-11-16 16:55
     */
    CheckinUserInfoVo selectByOid(Integer oldmanId);

    /**
     * 查询老人绑定的设备列表
     * author:liqian
     * date:2018-11-16 17:30
     */
    List<OldmanDevice> sltOldDeviceByOid(Integer oldmanId);

    /**
     * 查询老人私人定制
     * author:liqian
     * date:2018-11-16 17:35
     */
    List<Map<String, Object>> sltOldItemByOid(Integer oldmanId);

    /**
     * 查询入院老人列表
     * author:liqian
     * date:2018-11-22 17:44
     */
    List<Map<String, Object>> showAll(Map<String, Object> queryMap);


    /**
     * 查询已入住老人的基本信息
     * author:郑平
     * date:2018-11-29 11:01
     */
    List<OldmanInfo> showCheckInOldManInfo(Map<String, Object> queryMap);

    /**
     * 根据老人id查询套餐
     *
     * @param oldmanId
     * @return
     */
    List<SetMeal> sltSetMealsByOid(int oldmanId);

    List<SexCountVo> getSexAnalysis(Long homeId);

    List<SexCountVo> gerOldTypeAnalysis(Long homeId);

    SexCountVo getOldmanNalysis(Map map);

    List<BirthdayRemind> getOldBirthdayRemind(Map<String, Object> queryMap);

    int update(OldmanCheckIn oldmanCheckIn);

    List<OldmanRpcVo> getCheckinByHomeId(Integer homeId);

    /**
     * select count by set meal id
     *
     * @param setMealId set meal id
     * @return the int
     */
    int selectCountBySetMealId(Integer setMealId);

    int updateSelective(OldmanCheckIn oldmanCheckIn);

    int outByOldmanId(Integer oldmanId);

    /**
     * 查询老人所有信息（入院信息，个人信息，评估信息，床位，个性化套餐）
     *
     * @param oldmanId 老人ID
     * @return
     */
    Map<String, Object> queryoldManAllInfo(Integer oldmanId);

    List<CheckinUserInfoVo> selectGroupId();

    List<BirthdayRemind> getNewOldBirthdayRemind(OldManBirthdayDto oldManBirthdayDto);
}
